<template>
	<div id="city">
		<div class="left">
			<div>
				<p>热门城市</p>
				<p>
					<span>北京</span>
					<span>上海</span>
					<span>天津</span>
					<span>合肥</span>
					<span>郑州</span>
				</p>
			</div>
			<div id="A">
				<p>A</p>
				<p>阿克苏</p>
				<p>安康</p>
				<p>安庆</p>
			</div>
			<div id="B">
				<p>B</p>
				<p>白山</p>
				<p>白城</p>
				<p>宝鸡</p>
			</div>
			<div id="C">
				<p>C</p>
				<p>沧州</p>
				<p>长春</p>
				<p>昌吉</p>
			</div>
			<div id="D">
				<p>D</p>
				<p>大理</p>
				<p>大连</p>
				<p>大庆</p>
			</div>
			<div id="E">
				<p>E</p>
				<p>鄂尔多斯</p>
				<p>恩施</p>
				<p>鄂州</p>
			</div>
			<div id="F">
				<p>F</p>
				<p>****</p>
				<p>****</p>
				<p>****</p>
			</div>
			<div id="G">
				<p>G</p>
				<p>****</p>
				<p>****</p>
				<p>****</p>
			</div>
			<div id="H">
				<p>H</p>
				<p>****</p>
				<p>****</p>
				<p>****</p>
			</div>
			<div id="I">
				<p>I</p>
				<p>****</p>
				<p>****</p>
				<p>****</p>
			</div>
		</div>
		<div class="right">
			<p @click="addressW('A')">A</p>
			<p @click="addressW('B')">B</p>
			<p @click="addressW('C')">C</p>
			<p @click="addressW('D')">D</p>
			<p @click="addressW('E')">E</p>
		</div>
	</div>
</template>

<script>
	export default{
		name:'City',
		data(){
			return{
				
			}
		},
		methods:{
			addressW(id){
				const addressW=document.getElementById(id)
				addressW.scrollIntoView()
			}
		}
	}
</script>

<style scoped>
	.left{
		float: left;
		border-right: 1px solid #ccc;
		width: 90%;
		background: #fff5f0;
		margin-top: 10px;
	}
	.right{
		float: right;
		width: 8%;
		margin-top: 200px;
	}
	#city{
		overflow: hidden;
		margin-bottom: 40px;
	}
	.left div p:first-child{
		background: #f0f0f0;
	}
	p{
		line-height: 30px;
		padding-left: 10px;
	}
	span{
		background: white;
		border: 1px solid #ccc;
		display: inline-block;
		width: 80px;
		height: 40px;
		margin: 10px 10px 5px 0;
		text-align: center;
		line-height: 40px;
	}
</style>
